package com.boc.ewr.util.msg;

import org.jeecg.common.system.vo.ComboModel;

import java.util.List;

/**
 * @author : Wzz
 * @create : 2023-04- 23- 10:01
 * @desc :
 */
public class MessageUtil {
    public static String listToCommaStr(List<ComboModel> comboModels) {
        StringBuilder toUser = new StringBuilder();
        for (ComboModel comboModel : comboModels) {
            int lastIndex = comboModels.size() - 1;
            toUser.append(comboModel.getUsername());
            if (comboModels.indexOf(comboModel) != lastIndex) {
                toUser.append(",");
            }
        }
        return toUser.toString();
    }
}
